package String;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: adol book
 * Date: 2022-04-26
 * Time: 16:11
 */
public class demo2 {

    public static void MAin(int[] A,int m,int B[],int n){
        int i = m-1;  //从A数组最后一个下标开始
        int j = n-1;//从B数组最后一个下标开始
        int k = m+n-1;//从数组A和数组B加起来的最后一个下标开始
        while (i >= 0 && j>= 0){ //判断是否为0
            if(A[i] >= B[j]){
                A[k] = A[i];
                i--;
                k--;
            }else{
                A[k] = B[j];
                j--;
                k--;
            }
        }
        while (i >= 0){ //如果A数组中还有
            A[k] = A[i];
            i--;
            k--;
        }
        while (j >= 0){//如果B数组中还有
            A[k] = B[j];
            j--;
            k--;
        }
    }
    public static void main(String[] args) {

    }
    public static String fun(String s){
        int[] array = new int[127];
        StringBuffer s1 = new StringBuffer();
        for (int i = 0; i < s.length(); i++) {
            int ch = s.charAt(i);
            if(array[i] == 0){
                s1.append(ch);
                array[ch] =1;
            }
        }
        return s1.toString();
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){ //多组输入
            String sb = scanner.nextLine();
            String tep = fun(sb);
            System.out.println(tep);
        }
    }
}


